<?php /* Smarty version 2.6.12, created on 2008-10-30 12:48:48
         compiled from modules/News_Management/news_lists_select.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'modules/News_Management/news_lists_select.tpl', 6, false),array('modifier', 'strip_tags', 'modules/News_Management/news_lists_select.tpl', 71, false),)), $this); ?>
<?php func_load_lang($this, "modules/News_Management/news_lists_select.tpl","txt_delete_new_list_text,lbl_check_all,lbl_uncheck_all,lbl_list_name,lbl_show_as_news,lbl_active,txt_no_newslists,lbl_delete_selected,lbl_update,lbl_add_new,lbl_news_lists"); ?><?php ob_start(); ?>

<script type="text/javascript">
<!--
var txt_delete_new_list_text = "<?php echo ((is_array($_tmp=$this->_tpl_vars['lng']['txt_delete_new_list_text'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
";
-->
</script>

<?php if ($this->_tpl_vars['lists'] != ""): ?>

<script type="text/javascript" language="JavaScript 1.2">
<!--
checkboxes_form = 'selectlistsform';
checkboxes = new Array(<?php $_from = $this->_tpl_vars['lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
 if ($this->_tpl_vars['k'] > 0): ?>,<?php endif; ?>'to_delete[<?php echo $this->_tpl_vars['v']['listid']; ?>
]'<?php endforeach; endif; unset($_from); ?>);
 
--> 
</script>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "main/include_js.tpl", 'smarty_include_vars' => array('src' => "change_all_checkboxes.js")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<table width="100%">
<tr>
<td>
<div style="line-height:170%"><a href="javascript:change_all(true);"><?php echo $this->_tpl_vars['lng']['lbl_check_all']; ?>
</a> / <a href="javascript:change_all(false);"><?php echo $this->_tpl_vars['lng']['lbl_uncheck_all']; ?>
</a></div>
</td>
<td><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "main/language_selector.tpl", 'smarty_include_vars' => array('script' => "news.php?")));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></td>
</tr>
</table>

<?php endif; ?>

<form action="news.php" method="post" name="selectlistsform">
<input type="hidden" name="mode" value="update" />

<table cellpadding="3" cellspacing="1" width="100%">

<tr class="TableHead">
	<td width="15">&nbsp;</td>
	<td width="60%"><?php echo $this->_tpl_vars['lng']['lbl_list_name']; ?>
</td>
	<td width="20%" align="center"><?php echo $this->_tpl_vars['lng']['lbl_show_as_news']; ?>
</td>
	<td width="20%" align="center"><?php echo $this->_tpl_vars['lng']['lbl_active']; ?>
</td>
</tr>

<?php if ($this->_tpl_vars['lists'] != ""): ?>

<?php unset($this->_sections['idx']);
$this->_sections['idx']['name'] = 'idx';
$this->_sections['idx']['loop'] = is_array($_loop=$this->_tpl_vars['lists']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['idx']['show'] = true;
$this->_sections['idx']['max'] = $this->_sections['idx']['loop'];
$this->_sections['idx']['step'] = 1;
$this->_sections['idx']['start'] = $this->_sections['idx']['step'] > 0 ? 0 : $this->_sections['idx']['loop']-1;
if ($this->_sections['idx']['show']) {
    $this->_sections['idx']['total'] = $this->_sections['idx']['loop'];
    if ($this->_sections['idx']['total'] == 0)
        $this->_sections['idx']['show'] = false;
} else
    $this->_sections['idx']['total'] = 0;
if ($this->_sections['idx']['show']):

            for ($this->_sections['idx']['index'] = $this->_sections['idx']['start'], $this->_sections['idx']['iteration'] = 1;
                 $this->_sections['idx']['iteration'] <= $this->_sections['idx']['total'];
                 $this->_sections['idx']['index'] += $this->_sections['idx']['step'], $this->_sections['idx']['iteration']++):
$this->_sections['idx']['rownum'] = $this->_sections['idx']['iteration'];
$this->_sections['idx']['index_prev'] = $this->_sections['idx']['index'] - $this->_sections['idx']['step'];
$this->_sections['idx']['index_next'] = $this->_sections['idx']['index'] + $this->_sections['idx']['step'];
$this->_sections['idx']['first']      = ($this->_sections['idx']['iteration'] == 1);
$this->_sections['idx']['last']       = ($this->_sections['idx']['iteration'] == $this->_sections['idx']['total']);
?>

<tr>
	<td>
	<input type="hidden" name="posted_data[<?php echo $this->_tpl_vars['lists'][$this->_sections['idx']['index']]['listid']; ?>
][listid]" value="<?php echo $this->_tpl_vars['lists'][$this->_sections['idx']['index']]['listid']; ?>
" />
	<input type="checkbox" name="to_delete[<?php echo $this->_tpl_vars['lists'][$this->_sections['idx']['index']]['listid']; ?>
]" />
	</td>
	<td><b><a href="news.php?mode=modify&amp;targetlist=<?php echo $this->_tpl_vars['lists'][$this->_sections['idx']['index']]['listid']; ?>
" title="Click for details"><?php echo $this->_tpl_vars['lists'][$this->_sections['idx']['index']]['name']; ?>
</a></b></td>
	<td align="center"><input type="checkbox" name="posted_data[<?php echo $this->_tpl_vars['lists'][$this->_sections['idx']['index']]['listid']; ?>
][show_as_news]"<?php if ($this->_tpl_vars['lists'][$this->_sections['idx']['index']]['show_as_news'] == 'Y'): ?> checked="checked"<?php endif; ?> /></td>
	<td align="center"><input type="checkbox" name="posted_data[<?php echo $this->_tpl_vars['lists'][$this->_sections['idx']['index']]['listid']; ?>
][avail]"<?php if ($this->_tpl_vars['lists'][$this->_sections['idx']['index']]['avail'] == 'Y'): ?> checked="checked"<?php endif; ?> /></td>
</tr>

<?php endfor; endif; ?>

<?php else: ?>

<tr>
	<td colspan="4" align="center"><?php echo $this->_tpl_vars['lng']['txt_no_newslists']; ?>
</td>
</tr>

<?php endif; ?>

<tr>
	<td colspan="4"><br />
<?php if ($this->_tpl_vars['lists'] != ""): ?>
<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_delete_selected'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick='javascript: if (checkMarks(this.form, new RegExp("^to_delete\\[.+\\]", "gi")) && confirm(txt_delete_new_list_text)) submitForm(this.form, "delete");' />
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_update'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick='javascript: this.form.submit();' />
<br /><br />
<?php endif; ?>
<br />
<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_add_new'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: self.location='news.php?mode=create';" />
	</td>
</tr>

</table>
</form>

<?php $this->_smarty_vars['capture']['dialog'] = ob_get_contents(); ob_end_clean();  $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "dialog.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['lbl_news_lists'],'content' => $this->_smarty_vars['capture']['dialog'],'extra' => 'width="100%"')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>